* textprop.c (Fadd_text_properties): Initialize the modified flag.
authorJim Blandy <jimb@redhat.com>
Thu, 11 Mar 1993 07:17:54 +0000 (07:17 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 11 Mar 1993 07:17:54 +0000 (07:17 +0000)
Use a "for (;;)" loop at the end of the function, to indicate that
all exiting is taken care of inside the loop.
(Fremove_text_properties): Same.

src/textprop.c

index 871bd8875a791f63f647e90e3da7febd96e01129..06ae670c47f4d842c4f62df4d188ed6fa19383b4 100644 (file)
@@ -610,7 +610,7 @@ Return t if any property value actually changed, nil otherwise.")
      Lisp_Object start, end, properties, object;
 {
   register INTERVAL i, unchanged;
-  register int s, len, modified;
+  register int s, len, modified = 0;
 
   properties = validate_plist (properties);
   if (NILP (properties))
@@ -660,7 +660,7 @@ Return t if any property value actually changed, nil otherwise.")
     }
 
   /* We are at the beginning of an interval, with len to scan */
-  while (len > 0)
+  for (;;)
     {
       if (i == 0)
        abort ();
@@ -800,7 +800,7 @@ Return t if any property was actually removed, nil otherwise.")
      Lisp_Object start, end, props, object;
 {
   register INTERVAL i, unchanged;
-  register int s, len, modified;
+  register int s, len, modified = 0;
 
   if (NILP (object))
     XSET (object, Lisp_Buffer, current_buffer);
@@ -846,7 +846,7 @@ Return t if any property was actually removed, nil otherwise.")
     }
 
   /* We are at the beginning of an interval, with len to scan */
-  while (len > 0)
+  for (;;)
     {
       if (i == 0)
        abort ();